<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib uri="/resource/UserPwoer.tld" prefix="p"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<c:set var="path" value="${pageContext.request.contextPath }" />
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>个人资料</title>
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<script type="text/javascript"
	src="${path }/resource/js/jquery-2.1.4.min.js"></script>
<script type="text/javascript"
	src="${path }/resource/js/systools/DDMBase.js"></script>

<link rel="stylesheet"
	href="${path }/resource/weixin/css/personal-msg.css">
</head>
<body>
	<!-- 头部 -->
	<jsp:include page="_top.jsp"></jsp:include>
	<!-- 内容 -->
	<!-- 导航 -->
	<div class="padding-1 color-9">
		<span><a href="${path }/customer/redirect/personal"
			class="color-9">个人中心</a></span>&nbsp;&gt;&nbsp;<span>个人资料</span>
	</div>
	
	<form class="form-horizontal" id="dataform"
		onsubmit="javascripr:return false;">
	<!-- content -->
	<div class="padding-1 user-div back-w color-9">
		用户名<input class="float-r user-name" type="text" name="name"
		value="${user.name }"
			datatype="*1-20">
	</div>
	<div class="padding-1 user-div back-w color-9">
		所在地址<input class="float-r user-name" type="text" name="address" value="${user.address }"
			datatype="*1-20">
	</div>
	<div class="padding-1 user-div back-w color-9">
		邮箱<input class="float-r user-name" type="text" name="email" value="${user.email }"
			datatype="*1-20">
	</div>
	<div class="padding-1 user-div back-w color-9">
		生日<input class="float-r user-name" type="date" name="birthday" value="${user.birthday }"
			datatype="*1-20">
	</div>
	<div class="padding-1 user-div back-w color-9">
		性别
		
		<label>	男<input <c:if test="${user.sex eq '男'}">checked="checked"</c:if> class="float-r user-name"   value="男" type="radio" name="sex"></label>
		<label>	女<input <c:if test="${user.sex eq '女'}">checked="checked"</c:if> class="float-r user-name" value="女" type="radio" name="sex"></label>
	</div>
	<div class="margin-1 margin-t1 ">
		<button onclick="myForm.submit()" class="color-w back-y psw-btn">保存</button>
	</div>

	</form>
	<script type="text/javascript">
		var myForm, editor;
		$(function() {
			//初始化
			myForm = MForm.initForm({
				invokeUrl : "${path}/customer/updateUserInfo",
				afterSubmit : function(loj) {
					 //信息框
					  layer.open({
					    content: loj.getValue("info")
					    ,btn: '确定',
					    end:function(){
					    	MTools.redirect("${path}/customer/redirect/personal");
					    }
					  });
				},
			});
		})
	</script>
</body>
</html>